Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

When retrieving a font from a FontRegistry instance that is not cached in the registry yet, it will be created on the current display. In order to dispose the fonts of a display upon the display's disposal, the FontRegistry registers a dispose hook at the display instance. The current implementation only does this for the first display that is instantiated. For every further display, which may be created on Windows systems, no hook is added. Thus, if an additional display is disposed, its fonts remain in the FontRegistry, referring to a disposed display.

This change improved the FontRegistry implementation to properly register a dispose hook to every display for which it contains fonts. It also adds an according regression test.

@HeikoKlare HeikoKlare force-pushed the fontregistry-multiple-display branch from a2ffc06 to 841148c Compare December 5, 2024 10:19
@eclipse-platform-bot
Copy link
Contributor

eclipse-platform-bot commented Dec 5, 2024

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.jface/META-INF/MANIFEST.MF
tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From b5b50872970bf75397c72d2e8560131a9198af84 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Fri, 6 Dec 2024 11:54:16 +0000
Subject: [PATCH] Version bump(s) for 4.35 stream


diff --git a/bundles/org.eclipse.jface/META-INF/MANIFEST.MF b/bundles/org.eclipse.jface/META-INF/MANIFEST.MF
index de20b5090a..47bd323cd1 100644
--- a/bundles/org.eclipse.jface/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jface/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jface;singleton:=true
-Bundle-Version: 3.35.100.qualifier
+Bundle-Version: 3.35.200.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.jface,
diff --git a/tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF
index 48ffc6df3f..77076b9fd8 100644
--- a/tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.eclipse.jface.tests
-Bundle-Version: 1.4.700.qualifier
+Bundle-Version: 1.4.800.qualifier
 Automatic-Module-Name: org.eclipse.jface.tests
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.junit;bundle-version="4.12.0",
-- 
2.47.1

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Test Results

 1 821 files   1 821 suites   1h 52m 6s ⏱️
 7 728 tests  7 500 ✅ 228 💤 0 ❌
24 345 runs  23 596 ✅ 749 💤 0 ❌

Results for commit 140773f.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare force-pushed the fontregistry-multiple-display branch from cad2768 to 3ef3732 Compare December 5, 2024 12:13
@HeikoKlare HeikoKlare marked this pull request as ready for review December 5, 2024 14:12
@HeikoKlare HeikoKlare requested a review from fedejeanne December 6, 2024 09:14
When retrieving a font from a FontRegistry instance that is not cached
in the registry yet, it will be created on the current display. In order
to dispose the fonts of a display upon the display's disposal, the
FontRegistry registers a dispose hook at the display instance. The
current implementation only does this for the first display that is
instantiated. For every further display, which may be created on Windows
systems, no hook is added. Thus, if an additional display is disposed,
its fonts remain in the FontRegistry, referring to a disposed display.

This change improved the FontRegistry implementation to properly
register a dispose hook to every display for which it contains fonts. It
also adds an according regression test.
@HeikoKlare HeikoKlare force-pushed the fontregistry-multiple-display branch from 3ef3732 to 11c2271 Compare December 6, 2024 11:38
@vogella
Copy link
Contributor

vogella commented Dec 6, 2024

Nice to see that at least one PR builds green. These days this seems very rare even for things like Readme changes.....

@HeikoKlare HeikoKlare merged commit 1876695 into eclipse-platform:master Dec 9, 2024
17 checks passed
@HeikoKlare HeikoKlare deleted the fontregistry-multiple-display branch December 9, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants